class Story < ActiveRecord::Base
  belongs_to  :sprint,
              :class_name => 'Sprint',
              :foreign_key => 'sprint_id'
  belongs_to  :user

  validates_presence_of     :title
  validates_length_of       :title,  :within => 3..50
  validates_uniqueness_of   :title
  
  validates_presence_of     :text
  
  validates_presence_of     :weight
  
  validates_presence_of     :sprint_id
  
  validates_presence_of     :user_id
  
  validates_presence_of     :status
end
